import axios from '../../../utils/http.js'
export async function getData(currentPage, pageSize, roomName, responsibleName, centerId) {
  console.log(centerId)
  const {
    data
  } = await axios.get('/trainingRoom/trainingRoomPageData', {
    params: {
      currentPage: currentPage,
      pageSize: pageSize,
      roomName: roomName,
      centerId: centerId,
      responsibleName: responsibleName
    }
  })
  return data
}

export async function getListDataNew() {
  const {
    data
  } = await axios.get('/trainingCenter/trainingCenterList')
  return data
}
//实训室新增
export async function addTrainingRoom(peopleNumber, professionalNumber, responsibleNumber, roomName, trainingcenterId) {
  const {
    data
  } = await axios.post('/trainingRoom/trainingRoom', {
    peopleNumber: peopleNumber,
    professionalNumber: professionalNumber,
    responsibleNumber: responsibleNumber,
    roomName: roomName,
    trainingcenterId: trainingcenterId

  })
  return data
}
//实训室新增
export async function UpdataTrainingRoom(id, peopleNumber, professionalNumber, responsibleNumber, trainingcenterId) {
  const {
    data
  } = await axios.put('/trainingRoom/trainingRoom', {
    id: id,
    peopleNumber: peopleNumber,
    professionalNumber: professionalNumber,
    responsibleNumber: responsibleNumber,
    trainingcenterId: trainingcenterId

  })
  return data
}
// 删除值班情况   
export async function deleteTrainingRoom(id) {
  const {
    data
  } = await axios.delete('/trainingRoom/trainingRooms', {
    data: [id]
  })
  return data
}
